package d_decrator.b_design_pattern;

/**
 * Created by wug on 2016/6/22 0022.
 */
public class BlueTooth extends Decorator {

    private String desc = "蓝牙";
    private int price = 100;

    public BlueTooth(Component component) {
        super(component);
    }

    @Override
    public String showDesc() {
        return  component.showDesc() + desc + "\t" + price + "\n";
    }

    @Override
    public int showPrice() {
        return component.showPrice() + price;
    }

    @Override
    public int getPrice() {
        return price;
    }

    @Override
    public String getDesc() {
        return desc;
    }
}
